package com.xzz.dto;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class RegisterDto {
	
    @NotNull
    @Pattern(message = "电话格式不正确！", regexp = "^1([38][0-9]|4[579]|5[0-3,5-9]|6[6]|7[0135678]|9[89])\\d{8}$")
    private String mobile;

    @Size(min = 6, max = 12, message = "密码必须是6 ~ 12位！")
    private String password;
    
    @Size(min = 4, max = 4, message = "验证码必须是4位！")
    private String smsCode;
    
    private Integer regChannel;

    private String code;

}